def max_min(l):
    return max(l),min(l)

# print(max([2,6,4,8,7]))
# print(min([2,6,4,8,7]))

a = [2,6,4,8,7]

max_value,min_value = max_min(a)

print(max_value)
print(min_value)